﻿<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title - @ViewBag.Description</title>
    <link href="~/assets/Default/styles/simplemde.css" rel="stylesheet" />
    <link href="~/assets/@Template.Current.Identifier/styles/yuuko.css?v20150815" rel="stylesheet" />
    <script src="~/assets/@Template.Current.Identifier/scripts/jquery-1.10.2.min.js"></script>
    <script src="~/assets/Default/scripts/jquery.qrcode.min.js"></script>
    <script src="~/assets/Default/scripts/simplemde.js"></script>
    <script type="text/javascript" src="~/assets/shared/scripts/jquery.codecomb.fileupload.js"></script>
    <script type="text/javascript">
        if(top.location!==self.location){top.location=self.location}else{if(top!==self){if(confirm("Reload?")){top.location.reload()}}};
    </script>
    <script type="text/javascript">
        var CONFIG = {"Prefix":"","URI":"\/"};
    </script>
</head>
<body class="body-@ViewBag.Position">
    <div id="container">
        <div class="page-header">
            <div class="page-header-bar">
                <div class="cont-wrap">
                    <div class="grid_12">
                        <a class="page-header-li page-header-li-home @(ViewBag.Position == "home" ? "page-header-li-active" : "")" href="/"><div class="page-header-li-s"><div class="page-header-li-si"></div></div><div class="page-header-li-t">主页</div><div class="page-header-li-d">HOME</div></a>
                        @foreach (dynamic x in ViewBag.Catalogs)
                        {
                            <a class="page-header-li page-header-li-@x.Url.ToLower() @(ViewBag.Position == x.Url.ToLower() ? "page-header-li-active" : "")" href="/catalog/@x.Url/"><div class="page-header-li-s"><div class="page-header-li-si"></div></div><div class="page-header-li-t">@x.Title</div><div class="page-header-li-d">@x.Url.ToUpper()</div></a>
                        }
                        <div class="clear"></div>
                    </div><div class="clear"></div>
                </div>
            </div>
        </div><div class="page-before">
            <div class="page-before-inner">
                <div class="cont-wrap">
                    <div class="grid_12">
                        <div class="page-title">
                            <div class="page-title-content">
                                @if (Model is Post)
                                {
                                    <p><h1>@ViewBag.Title</h1></p>
                                    <p><h3><span class="icon-time icon"></span> Published on @Model.Time.ToString()</h3></p>
                                }
                                else
                                {
                                    <h1>@ViewBag.Title@(ViewBag.Position == "home" ? "" : (" » " + ViewBag.Position.ToUpper()))@(ViewContext.RouteData.Values["tag"] == null ? "" : (" » " + ViewContext.RouteData.Values["tag"].ToString().ToUpper()))@(ViewContext.RouteData.Values["year"] == null ? "" : (" » " + ViewContext.RouteData.Values["year"].ToString()))@(ViewContext.RouteData.Values["month"] == null ? "" : (" » " + ViewContext.RouteData.Values["month"].ToString()))@(ViewContext.RouteData.Values["p"] == null ? "" : (" » PAGE" + ViewContext.RouteData.Values["p"].ToString()))</h1>
                                }
                            </div>
                        </div>
                    </div><div class="clear"></div>
                </div>
            </div>
        </div>
        <div class="page-before-push"></div>

        <div class="page-content">
            @RenderBody()
        </div>
        <div class="page-footer">
            <a class="footer-rss-wrap" href="/blog/feed" target="_blank" yuuko-static><span class="footer-rss icon-feed"></span></a>
            <div class="cont-wrap">
                <div class="grid_12">
                    <div class="copyright">
                        <p>
                            Copyright © 2016 <a href="http://www.1234.sh" target="_self">Amamiya Yuuko</a>, all rights reserved. 黑ICP备15005987号.
                        </p>
                        <p>Powered by <a href="https://github.com/PomeloFoundation/YuukoBlog" target="_blank" yuuko-static>YuukoBlog</a>, Template: 
                            <select id="lstTemplate">
                                @foreach (var t in Template.Collection.Templates)
                                {
                                    <!option @(Template.Current.Identifier == t.Identifier ? "selected" : "") value="@t.Identifier">@t.Title</!option>
                                }
                            </select>
                        @if (!Html.IsAdmin())
                        {
                            <a href="/admin/login" target="_self">Manage</a>
                        }
                        </p>
                    </div>
                    <div class="azure">
                        <a target="_blank" href="http://www.azure.com/"><img src="~/assets/Default/images/azure.png" class="azure-logo" alt="Hosted on Microsoft Azure" /></a>
                    </div>
                </div><div class="clear"></div>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="/assets/Default/scripts/highlight.js"></script>
    <script type="text/javascript" src="/assets/Default/scripts/prettify.js"></script>
    <script type="text/javascript" src="/assets/Default/scripts/yuuko.js"></script>
    <script type="text/javascript">
    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
    var disqus_shortname = "@ViewBag.Disqus"; // required: replace example with your forum shortname

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function() {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
    </script>
</body>
</html>
